def prompt()
  print ">"
end

def hot_room()
  puts "There is a wolf in this room,"
  puts "The wolf have a black look at you,"
  puts "How can you fell your life with the wolf?"
  
  prompt
  next_move = gets.chomp
  if next_move == "taunt wolf"
    dead("The wolf scared and you run away.")
  elsif  next_move == "take honey"
    dead("The wolf ignored you and you fell your life.")
  else 
    dead("The wolf run to you and eat your head.")
  end 
end

def cold_room()
  puts "There is a big snake in this room."
  puts "The snake have a deep sleep and don't konw you were here."
  puts "What you will do with the snake?"

  prompt
  next_move = gets.chomp
  if next_move.include?"attack the snake"
     dead("The snake wake up and eat you.")
  elsif next_move.include?"run"
     dead("You scared an you run away.")
  else 
     hot_room()
  end
end

def dead(right)
  puts "#{right}, you are lost."
  Process.exit(0)
end

def start()
  puts "You walk on a small town."
  puts "You suddently find two ways to two house."
  puts "Which one do you take?"
  
  prompt
  next_move = gets.chomp
  if next_move == "left"
     hot_room
  elsif next_move == "right"
     cold_room
  else
     dead("you dont't have interest in this")
  end
end

start()


#这是我自己设计的更前面一节差不多的小东西，时间有点赶，只能把一些简单的东西加进去，我自己试着运行了，可以跑起来，里面的东西搞懂里做这种小东西还是没什么压力的，to_i 也就是传到XX里面的意思，一查就出来了，那个.include?跟=有什么区别啊？没查出来include?的用法，都是一样到在定义X=Y吧？
#在这个里面我没有添加while循环进去，因为还用到不是很熟，怕加了跑不起来，当然如果是跟前一节那样用到话倒没什么问题，我再练习一下，看能做点更复杂到东西出来不
